
function voteVideo(video_id, post_url){
    $('loading_indicator_' + video_id).show();
    var ajax = new Ajax();
    ajax.responseType = Ajax.JSON;
    
    ajax.ondone = function(data){
        $('loading_indicator_' + video_id).hide();
        if (data.error) {
            fb_message("Error!", data.error);
        }
        else {
            fb_message("Info", data.message);
            //change text
            $('video_votes_' + data.video_id).setTextValue(data.html_to_update);
        }
    }
    
    ajax.post(post_url);
    
    
}
